Optimal. Leaf size=69 \[ -\frac{(a+b)^2 \log \left (a \cos ^2(e+f x)+b\right )}{2 a b^2 f}+\frac{(a+2 b) \log (\cos (e+f x))}{b^2 f}+\frac{\sec ^2(e+f x)}{2 b f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.099578, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {4138, 446, 88} \[ -\frac{(a+b)^2 \log \left (a \cos ^2(e+f x)+b\right )}{2 a b^2 f}+\frac{(a+2 b) \log (\cos (e+f x))}{b^2 f}+\frac{\sec ^2(e+f x)}{2 b f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4138
Rule 446
Rule 88
Rubi steps
\begin{align*} \int \frac{\tan ^5(e+f x)}{a+b \sec ^2(e+f x)} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{\left (1-x^2\right )^2}{x^3 \left (b+a x^2\right )} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{(1-x)^2}{x^2 (b+a x)} \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{1}{b x^2}+\frac{-a-2 b}{b^2 x}+\frac{(a+b)^2}{b^2 (b+a x)}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f}\\ &=\frac{(a+2 b) \log (\cos (e+f x))}{b^2 f}-\frac{(a+b)^2 \log \left (b+a \cos ^2(e+f x)\right )}{2 a b^2 f}+\frac{\sec ^2(e+f x)}{2 b f}\\ \end{align*}
Mathematica [A] time = 0.293114, size = 99, normalized size = 1.43 \[ \frac{\sec ^2(e+f x) (a \cos (2 (e+f x))+a+2 b) \left (a b \sec ^2(e+f x)+(a+b)^2 \left (-\log \left (-a \sin ^2(e+f x)+a+b\right )\right )+2 a (a+2 b) \log (\cos (e+f x))\right )}{4 a b^2 f \left (a+b \sec ^2(e+f x)\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.061, size = 112, normalized size = 1.6 \begin{align*} -{\frac{a\ln \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }{2\,f{b}^{2}}}-{\frac{\ln \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }{fb}}-{\frac{\ln \left ( b+a \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) }{2\,af}}+{\frac{\ln \left ( \cos \left ( fx+e \right ) \right ) a}{f{b}^{2}}}+2\,{\frac{\ln \left ( \cos \left ( fx+e \right ) \right ) }{fb}}+{\frac{1}{2\,fb \left ( \cos \left ( fx+e \right ) \right ) ^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.01583, size = 109, normalized size = 1.58 \begin{align*} \frac{\frac{{\left (a + 2 \, b\right )} \log \left (\sin \left (f x + e\right )^{2} - 1\right )}{b^{2}} - \frac{1}{b \sin \left (f x + e\right )^{2} - b} - \frac{{\left (a^{2} + 2 \, a b + b^{2}\right )} \log \left (a \sin \left (f x + e\right )^{2} - a - b\right )}{a b^{2}}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.698029, size = 205, normalized size = 2.97 \begin{align*} -\frac{{\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{2} \log \left (a \cos \left (f x + e\right )^{2} + b\right ) - 2 \,{\left (a^{2} + 2 \, a b\right )} \cos \left (f x + e\right )^{2} \log \left (-\cos \left (f x + e\right )\right ) - a b}{2 \, a b^{2} f \cos \left (f x + e\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan ^{5}{\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 3.14862, size = 539, normalized size = 7.81 \begin{align*} -\frac{\frac{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \log \left ({\left | -a{\left (\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} - b{\left (\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} - 2 \, a + 2 \, b \right |}\right )}{a^{2} b^{2} + a b^{3}} - \frac{\log \left (-\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2\right )}{a} - \frac{{\left (a + 2 \, b\right )} \log \left (-\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 2\right )}{b^{2}} + \frac{a{\left (\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 2 \, b{\left (\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 2 \, a + 8 \, b}{b^{2}{\left (\frac{\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac{\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2\right )}}}{2 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]